#pragma once

#include <AVUIMaterial.h>
#include <AVUIColor.h>

namespace AVUI {

class Brush;


class EmissiveMaterial : public Material
{
public:
    EmissiveMaterial() { };

    DECLARE_ELEMENT(EmissiveMaterial, Material);

    DECLARE_DEPENDENCY_PROPERTY(Brush);
    TRefCountedPtr<Brush> get_Brush() { return (Brush*)(Object*)GetValue(get_BrushProperty()); }
    void set_Brush(Brush* pValue) { SetValue(get_BrushProperty(), (Object*)pValue); } 

    DECLARE_DEPENDENCY_PROPERTY(Color);
    Color get_Color() { return AVUI::UnboxValue<Color>(GetValue(get_ColorProperty())); }
    void set_Color(const Color& value) { SetValue(get_ColorProperty(), AVUI::BoxValue(value)); } 

protected:

    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<EmissiveMaterial>().get_Ptr(); }

private:
    static void StaticConstructor();

};


}; // namespace AVUI
